#include <iostream>
#include <cstdlib>
#include <cv.h>
#include <highgui.h>
#include <time.h>
#include "bezier.h"

using namespace std;
using namespace cv;

int randRange(int, int);

Bezier test;

int main() {
    Mat img(100, 100, CV_32FC1);
    Mat sm(20, 20, CV_32FC1);

    srand(time(NULL));

    while (true) {
    resize(img, sm, Size(0,0), 0.1, 0.1, INTER_NEAREST);
    line(sm, Point(randRange(0,10),randRange(0,10)), Point(randRange(0,10),randRange(0,10)), Scalar(1.0,1.0,1.0));
    resize(sm, img, Size(0,0), 10, 10, INTER_NEAREST);

    namedWindow("Display Image", CV_WINDOW_AUTOSIZE);
    imshow("Display Image", img);
    waitKey(0);
    }


}

int randRange(int s, int e) {
    return (int)(s + (float)e*rand()/RAND_MAX);
}
